package com.ubi.core.base;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Date;

/**
 * 公共MODEL
 * 
 * @author : lvh
 * @date: 16-01-29
 */
@JsonIgnoreProperties(value = { "create_by", "create_date", "update_date", "update_by", "del_flag" })
public abstract class BaseModel {

    @JsonProperty("create_by")
    private Long createBy;

    @JsonProperty("create_date")
    private Date createDate;

    @JsonProperty("update_by")
    private Long updateBy;

    @JsonProperty("update_date")
    private Date updateDate;

    private String remarks;

    @JsonProperty("del_flag")
    private Boolean delFlag;

    public Long getCreateBy() {

        return createBy;
    }

    public void setCreateBy(Long createBy) {

        this.createBy = createBy;
    }

    public Date getCreateDate() {

        return createDate;
    }

    public void setCreateDate(Date createDate) {

        this.createDate = createDate;
    }

    public Long getUpdateBy() {

        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {

        this.updateBy = updateBy;
    }

    @JsonIgnore
    public Date getUpdateDate() {

        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {

        this.updateDate = updateDate;
    }

    public String getRemarks() {

        return remarks;
    }

    public void setRemarks(String remarks) {

        this.remarks = remarks == null ? null : remarks.trim();
    }

    public Boolean getDelFlag() {

        return delFlag;
    }

    public void setDelFlag(Boolean delFlag) {

        this.delFlag = delFlag;
    }
}
